#include "StdAfx.h"
#include "HttpDownload.h"

CHttpDownload::CHttpDownload(void)
{

}

CHttpDownload::~CHttpDownload(void)
{

}

STDMETHODIMP CHttpDownload::Init()
{
	RASSERT(AddConnectionPoint(re_uuidof(IDownLoadTaskPoint) , m_NotifyConnetion) , E_FAIL);
	return S_OK;
}

STDMETHODIMP CHttpDownload::Uninit()
{
	DelConnectionPoint(re_uuidof(IDownLoadTaskPoint) , m_NotifyConnetion);
	return S_OK;
}

STDMETHODIMP CHttpDownload::SetDownloadInfo(const download_info& info)
{
	m_dlInfo = info;

	CallConnectPointFunc(m_NotifyConnetion , IDownLoadTaskPoint , OnDownLoadTaskNotify(NullUrlHash, Msg_Downloading,0,0));
	return S_OK;
}

STDMETHODIMP CHttpDownload::StartDownload(LPCWSTR lpszUrl,  OUT sha1_hash& urlhash ,DSType dsType /*= DS_Unknow*/, BOOL bCheckExist/* = FALSE*/)
{
	return S_FALSE;
}

STDMETHODIMP CHttpDownload::Pause ()
{
	return S_OK;
}

STDMETHODIMP CHttpDownload::Resume()
{
	return S_OK;
}

STDMETHODIMP CHttpDownload::Stop(BOOL remove_files /*= FALSE*/)
{
	return S_OK;
}

STDMETHODIMP CHttpDownload::GetStat(StateMessageID statid, void* data, int nlen)
{
	return S_OK;
}

STDMETHODIMP CHttpDownload::SetStat(StateMessageID statid, void* data, int nlen)
{
	return S_OK;
}

STDMETHODIMP CHttpDownload::GetShareFile(IShareFile**pFileRead)
{
	return S_OK;
}